<template>
	<view class="app-container">
		<view class="header">
			<view class="header-left">
				我的留言
			</view>
		</view>
		
		<view class="record-list">
			<view class="record-item" v-for="(item,index) in info.list">
				<view class="time">于{{item.addtime}}</view>
				<view class="article">{{item.article}}</view>	
				<view class="content">{{item.content}}</view>
		
			</view>
			
		</view>
		
	</view>
</template>

<script>
import { checkInList, personMessageList } from '../../api';
import { config } from '../../utils/utils';
	export default {
		data() {
			return {
				type: 1,
				info: {
					count: 3,
					score: 30,
					list: []
				}
			}
		},
		onLoad(options) {
			this.getListInfo();
		},
		methods: {
			getListInfo() {
				let userInfo = uni.getStorageSync(config.userInfo);	
				personMessageList({openId:userInfo.openid}).then(res=>{
					this.info.list = res.info;
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.app-container {
		// width: 100%;
		display: flex;
		width: calc(100% - 60rpx);
		margin-left: 30rpx;
		.header {
			width: 100%;
			height: 92rpx;
			display: flex;
			justify-content: space-between;
			.header-left {
				font-size: 36rpx;
				color: #333333;
			}
			.header-right {
				color: #333333;
				display: flex;
				flex-direction: row;
				vertical-align: bottom;
				.header-right-row {
					font-size: 24rpx;
					text {
						font-size: 36rpx;
					}
					&:last-child {
						margin-left: 30rpx;
					}
				}
			}
		}
		.record-list {
			width: 100%;
			display: flex;
			flex-direction: column;
			.record-item {
				overflow: hidden;
				padding: 30rpx 0;
				display: flex;
				flex-direction: column;
				border-top: 1px solid #F8F8F8;
				font-size: 24rpx;
				line-height: 1.4;
									
				.time {
					// margin-top: 10rpx;

					color: #808080;
				}
				.article {
					color:#808080;
					// margin-top: 10rpx;
					
				}
				.content {		
					margin-top: 10rpx;
					display: inline-block;
					word-wrap: wrap;
					color: #333333;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 4; /* 定义文本的行数 */
					overflow: hidden;
					text-overflow: ellipsis;
				}
			
			}
		}
	}

</style>
